home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / misc / wasy.sty < prev    next >
Text File  |  1992-12-03  |  8KB  |  245 lines

  1. %% wasy.sty  v 1.1 von J"org Knappen 28. 11. 1992
  2. %% (c) J"org Knappen 1992         knappen@vkpmzd.kph.uni-mainz.de
  3. %% Copying conditions: GNU licence v1.0
  4. %% The WASY fonts are loaded and a lot of control sequences are
  5. %% defined
  6. %% \wasy    acts as a font switch, switching its argument to wasy
  7.  
  8. \@ifundefined{extract@font}
  9.      {\errmessage{The style option `wasy' does not make sense if you
  10.                   do not use a format with the new font selection scheme.}
  11.       \endinput}
  12.      {}
  13.  
  14.   \def\RIfM@{\relax\protect\ifmmode}
  15.     \let\boxz@\fi % \if \fi matching hack
  16.   \def\boxz@{\box\z@}
  17.   \def\setboxz@h{\setbox\z@\hbox}
  18.   \def\wdz@{\wd\z@}
  19.   \def\noaccents@{\def\accentclass@{0}}
  20.   \def\Invalid@@{Invalid use of \string}
  21.   \def\nonmatherr@#1{\err@
  22.     {\string#1\space allowed only in math mode}\@ehd}
  23.   \def\err@{\@latexerr}
  24.  
  25. \newmathalphabet\wasy@
  26. \addtoversion{normal}\wasy@{wasy}{m}{n}
  27. \addtoversion{bold}\wasy@{wasy}{b}{n}
  28. \new@mathgroup\wasy@group
  29. \define@mathgroup\mv@normal\wasy@group{wasy}{m}{n}
  30. \define@mathgroup\mv@bold\wasy@group{wasy}{b}{n}
  31. % Precautions for national styles changing the \catcode of "
  32. \chardef\dq@code=\catcode`\"
  33. \catcode`\"=12
  34. \edef\@wasy{\hexnumber@\wasy@group}
  35. \def\pwasy{\RIfM@\expandafter\wasy@\else
  36.                   \expandafter\nonmatherr@\expandafter\wasy\fi}
  37. \def\wasy{\protect\pwasy}
  38. \new@fontshape{wasy}{m}{n}{%
  39.   <5>wasy5%
  40.   <6>wasy6%
  41.   <7>wasy7%
  42.   <8>wasy8%
  43.   <9>wasy9%
  44.   <10>wasy10%
  45.   <11>wasy11%  This one was computed with the help of the Sauter tools
  46. %  <11>wasy10 at10.95pt% alternative, change the position of the % sign to
  47. %                         choose this
  48.   <12>wasy12%
  49.   <14>wasy14%  Ditto, design_size:=14.4;
  50. %  <14>wasy12 at14.4pt%  alternative
  51.   <17>wasy17%
  52. %  <20>wasy17 at19.71pt%
  53.   <20>wasy20%
  54. %  <25>wasy17 at24.48pt%
  55.   <25>wasy25%
  56.   }{}
  57. \new@fontshape{wasy}{b}{n}{%
  58.   <5>wasyb5%
  59.   <6>wasyb6%
  60.   <7>wasyb7%
  61.   <8>wasyb8%
  62.   <9>wasyb9%
  63.   <10>wasyb10%
  64.   <11>wasyb11%  This one was computed with the help of the Sauter tools
  65. %  <11>wasyb10 at10.95pt% alternative, change the position of the % sign to
  66. %                         choose this
  67.   <12>wasyb12%
  68.   <14>wasyb14%  Ditto, design_size:=14.4;
  69. %  <14>wasyb12 at14.4pt%  alternative
  70.   <17>wasyb17%
  71. %  <20>wasyb17 at19.71pt%
  72.   <20>wasyb20%
  73. %  <25>wasyb17 at24.48pt%
  74.   <25>wasyb25%
  75.   }{}
  76. \extra@def{wasy}{}{\noaccents@}
  77. % The following was extracted from:
  78. % this is wasyfont.tex version 2.01--92/10
  79. % Overall changes: Introduced \mathhexbox
  80. % Changes made due to the nature of the wasy font as a math font
  81. % Introduced $-signs etc.
  82. %%%%%% special macro
  83. \def\overstrike#1#2{{\setbox0\hbox{$#2$}\hbox to \wd0{\hss
  84.     $#1$\hss}\kern-\wd0\box0}}
  85. %%%%%% special symbols
  86. \edef\male{\mathhexbox\@wasy1A}
  87. \edef\female{\mathhexbox\@wasy19}
  88. \edef\currency{\mathhexbox\@wasy1B}
  89. \edef\phone{\mathhexbox\@wasy07}
  90. \edef\recorder{\mathhexbox\@wasy06}
  91. \edef\clock{\mathhexbox\@wasy1C}
  92. \edef\lightning{\mathhexbox\@wasy12}
  93. \edef\pointer{\mathhexbox\@wasy09}
  94. \edef\RIGHTarrow{\mathhexbox\@wasy11}
  95. \edef\LEFTarrow{\mathhexbox\@wasy10}
  96. \edef\UParrow{\mathhexbox\@wasy4B}
  97. \edef\DOWNarrow{\mathhexbox\@wasy4C}
  98. \def\AC{\hbox{\kern0.5pt$\wasy{\photonchar}$\kern0.5pt}}
  99. \def\HF{\lower0.9pt\hbox to 0pt{\kern0.5pt$\wasy{\photonchar}$\hss}%
  100.         \raise0.9pt\hbox{\kern0.5pt$\wasy{\photonchar}$\kern0.5pt}}
  101.  
  102. \edef\VHF{\mathhexbox\@wasy40}
  103. \edef\Box{\mathhexbox\@wasy32}\let\Square\Box
  104. \edef\XBox{\mathhexbox\@wasy34}
  105. \edef\Diamond{\mathhexbox\@wasy33}
  106. \edef\hexagon{\mathhexbox\@wasy37}
  107. \edef\pentagon{\mathhexbox\@wasy44}
  108. \edef\octagon{\mathhexbox\@wasy38}
  109. \edef\varhexagon{\mathhexbox\@wasy39}
  110. \edef\hexstar{\mathhexbox\@wasy41}
  111. \edef\varhexstar{\mathhexbox\@wasy42}
  112. \edef\davidsstar{\mathhexbox\@wasy43}
  113. \edef\diameter{\mathhexbox\@wasy1F}
  114. \edef\invdiameter{\mathhexbox\@wasy15}
  115. \edef\varangle{\mathhexbox\@wasy1E}
  116. \edef\lozenge{\mathhexbox\@wasy35}
  117. \edef\kreuz{\mathhexbox\@wasy36}
  118. \edef\smiley{\mathhexbox\@wasy2C}
  119. \edef\frownie{\mathhexbox\@wasy2F}
  120. \edef\blacksmiley{\mathhexbox\@wasy2D}
  121. \edef\sun{\mathhexbox\@wasy2E}
  122. \edef\checked{\mathhexbox\@wasy08}
  123. \edef\bell{\mathhexbox\@wasy0A}
  124. \edef\eighthnote{\mathhexbox\@wasy0B}
  125. \edef\quarternote{\mathhexbox\@wasy0C}
  126. \edef\halfnote{\mathhexbox\@wasy0D}
  127. \edef\fullnote{\mathhexbox\@wasy0E}
  128. \edef\twonotes{\mathhexbox\@wasy0F}
  129. \edef\brokenvert{\mathhexbox\@wasy7C}
  130. \edef\therefore{\mathhexbox\@wasy05}
  131. \edef\ataribox{\mathhexbox\@wasy6D}
  132. \edef\Circle{\mathhexbox\@wasy23}
  133. \edef\CIRCLE{\mathhexbox\@wasy20}
  134. \edef\Leftcircle{\mathhexbox\@wasy49}
  135. \edef\LEFTCIRCLE{\mathhexbox\@wasy47}
  136. \edef\Rightcircle{\mathhexbox\@wasy4A}
  137. \edef\RIGHTCIRCLE{\mathhexbox\@wasy48}
  138. \edef\LEFTcircle{\hbox to 0pt{\LEFTCIRCLE\hss}\hbox{\Circle}}
  139. \edef\RIGHTcircle{\hbox to 0pt{\RIGHTCIRCLE\hss}\hbox{\Circle}}
  140. %%%%%% astronomy
  141.  
  142. \edef\vernal{\mathhexbox\@wasy17}
  143. \edef\ascnode{\mathhexbox\@wasy13}
  144. \edef\descnode{\mathhexbox\@wasy14}
  145. \edef\fullmoon{\mathhexbox\@wasy23}
  146. \edef\newmoon{\mathhexbox\@wasy20}
  147. \edef\leftmoon{\mathhexbox\@wasy24}
  148. \edef\rightmoon{\mathhexbox\@wasy25}
  149. \edef\astrosun{\hbox{$\odot$}}
  150. \edef\mercury{\mathhexbox\@wasy27}
  151. \edef\venus{\raise0.2ex\hbox{\female}}
  152. \edef\earth{\lower0.3ex\hbox{\mathhexbox\@wasy26}}
  153. \edef\mars{\lower0.2ex\hbox{\male}}
  154. \edef\jupiter{\mathhexbox\@wasy58}
  155. \edef\saturn{\mathhexbox\@wasy59}
  156. \edef\uranus{\mathhexbox\@wasy5A}
  157. \edef\neptune{\mathhexbox\@wasy5B}
  158. \edef\pluto{\mathhexbox\@wasy5C}
  159. \edef\conjunction{\mathhexbox\@wasy56}
  160. \edef\opposition{\mathhexbox\@wasy57}
  161. %%%%%% the zodiac
  162. \edef\aries{\mathhexbox\@wasy17}
  163. \edef\taurus{\mathhexbox\@wasy5D}
  164. \edef\gemini{\mathhexbox\@wasy5E}
  165. \edef\cancer{\mathhexbox\@wasy5F}
  166. \edef\leo{\mathhexbox\@wasy13}
  167. \edef\virgo{\mathhexbox\@wasy60}
  168. \edef\libra{\mathhexbox\@wasy61}
  169. \edef\scorpio{\mathhexbox\@wasy62}
  170. \edef\sagittarius{\mathhexbox\@wasy63}
  171. \edef\capricornus{\mathhexbox\@wasy64}
  172. \edef\aquarius{\mathhexbox\@wasy65}
  173. \edef\pisces{\mathhexbox\@wasy66}
  174. %%%%%% APL characters
  175. \edef\APLstar{\mathhexbox\@wasy45}
  176. \edef\APLlog{\mathhexbox\@wasy16}
  177. \edef\APLbox{\mathhexbox\@wasy7E}
  178. \edef\APLup{\mathhexbox\@wasy00}
  179. \edef\APLdown{\mathhexbox\@wasy46}
  180. \edef\APLinput{\mathhexbox\@wasy7D}
  181. \edef\APLcomment{\mathhexbox\@wasy7F}
  182. \edef\APLinv{\hbox to 0pt{$\div$\hss}\APLbox}
  183. \edef\APLuparrowbox{\mathhexbox\@wasy6E}
  184. \edef\APLdownarrowbox{\mathhexbox\@wasy6F}
  185. \edef\APLleftarrowbox{\mathhexbox\@wasy70}
  186. \def\APLrightarrowbox{\mathhexbox\@wasy71}
  187. \def\notbackslash{\overstrike{\backslash}{-}}
  188. \def\notslash{\overstrike{/}{-}}
  189. \def\APLnot#1{\overstrike{\sim}{#1}}
  190. \def\APLcirc#1{\overstrike{\circ}{#1}}
  191. \def\APLvert#1{\overstrike{\vert}{#1}}
  192. \def\APLminus{\raise0.7ex\hbox{$-$}}
  193. %%%%%% diagrams
  194. \edef\photonchar{\mathhexbox\@wasy3A}
  195. \def\photon{\hbox{$\wasy{\photonchar\photonchar\photonchar\photonchar}$}}
  196. \def\gluon{\hbox{$\wasy{\char"51\char"50\char"50\char"50%
  197.     \char"50\char"50\char"50\char"52}$}}
  198. %%%%%% math characters
  199. \edef\Bowtie{\mathhexbox\@wasy31}
  200. \edef\leftturn{\mathhexbox\@wasy22}
  201. \edef\rightturn{\mathhexbox\@wasy21}
  202. %%%%%% special characters
  203. \edef\cent{\mathhexbox\@wasy67}
  204. \edef\permil{\mathhexbox\@wasy68}
  205. \edef\agemO{\mathhexbox\@wasy30}
  206. \edef\thorn{\mathhexbox\@wasy69}
  207. \edef\Thorn{\mathhexbox\@wasy6A}
  208. \edef\dh{\mathhexbox\@wasy6B}
  209. \def\Dh{\leavevmode{\setbox0\hbox{D}%
  210.     \hbox to\wd0{\kern 0.04em\char32\hss D}}}
  211. \edef\openo{\mathhexbox\@wasy6C}
  212. \edef\inve{\mathhexbox\@wasy55}
  213. %%%%%% math operators as mathchars
  214. \def\invmathchardef#1#2{\mathchardef#2"#1}
  215. \invmathchardef{3\@wasy01}{\lhd}
  216. \invmathchardef{3\@wasy03}{\rhd}
  217. \invmathchardef{3\@wasy10}{\LHD}
  218. \invmathchardef{3\@wasy11}{\RHD}
  219. \invmathchardef{3\@wasy02}{\unlhd}
  220. \invmathchardef{3\@wasy04}{\unrhd}
  221. \invmathchardef{3\@wasy3C}{\sqsubset}
  222. \invmathchardef{3\@wasy3D}{\sqsupset}
  223. \invmathchardef{3\@wasy3E}{\apprle}
  224. \invmathchardef{3\@wasy3F}{\apprge}
  225. \invmathchardef{3\@wasy1D}{\varpropto}
  226. \invmathchardef{0\@wasy18}{\invneg}
  227. \invmathchardef{3\@wasy3B}{\leadsto}
  228. \invmathchardef{2\@wasy23}{\ocircle}
  229. \invmathchardef{3\@wasy16}{\logof}
  230. \invmathchardef{1\@wasy72}{\varint}
  231. \invmathchardef{1\@wasy73}{\iint}
  232. \invmathchardef{1\@wasy74}{\iiint}
  233. \invmathchardef{1\@wasy75}{\varoint}
  234. \invmathchardef{1\@wasy76}{\oiint}
  235. %
  236. %%%%%% new definitions
  237. %
  238. \def\newpropto{\let\propto\varpropto}
  239. \def\newint{\let\int\varint \let\oint\varoint} % default limits
  240.  
  241. % Save LaTeX \mho
  242. \let\mho\amegO
  243. \catcode`\"=\dq@code
  244. \endinput
  245.